<?php


namespace app\wps\model;


use app\api\model\User;

class GeneralUser extends BaseModel
{
    protected $autoWriteTimestamp = true;
//    protected $createTime = ;


    /**
     * 用户是否存在
     * 存在返回uid，不存在返回0
     */
    public static function getByOpenID($openid)
    {
        $user = User::where('openid', '=', $openid)
            ->find();
        return $user;
    }

}
